!!!###!!!title=130-How to configure the colors of different line segments in a line chart——VisActor/VChart FAQ documents!!!###!!!

How to configure the colors of different line segments in a line chart?

Question Description

I am dealing with the requirement of a line chart, and I need to configure the line segments in the line chart to be different colors, but the chart examples and some library functions I have found can only make the line segments the same color. Is there any solution?

Solution

In VChart, different line segments in the line chart can be set to different styles through the line.style configuration. At the same time, VChart also supports setting callback functions to return style results based on different data contents.

Code Example

Quote